package operation;


public class TomcatDirElement {
	private String id;
	private String user;
	private String group;
	private String path;

	public TomcatDirElement(String findlist) {
		///home/web/software/apache-tomcat-9.0.30 drwxrwxr-x 10 quantdo quantdo 4096 Dec 19 19:25 /home/web/software/apache-tomcat-9.0.30
		if(null != findlist && 0 < findlist.lastIndexOf(" ")){
			String[] item = findlist.split(" ");
			this.id = item[0];
			this.user = item[3];
			this.group = item[4];
			this.path = item[0];
		}
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getGroup() {
		return group;
	}

	public void setGroup(String group) {
		this.group = group;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	@Override
	public String toString() {
		return "TomcatDirElement [id=" + id + ", user=" + user + ", group=" + group + ", path=" + path + "]";
	}

}
